<template>
  <div>
    <div v-show="addOrder===false">
      <div class="title">订单列表</div>
      <div style="background-color: #fff;width: 100%;">
          <div style="padding: 10px 10px 10px 10px; display: flex;">
            <el-input placeholder="请输入订单号" @click-suffix="search" suffix-icon="el-icon-search" style="width: 300px;">
            </el-input>
            <div style="margin-left: auto;margin-right: 50px;">
              <el-button icon="el-icon-circle-plus">添加</el-button>
            </div>
          </div>

          <!-- 表格 -->
          <div style="padding:10px;margin-bottom: 100px;margin-right:50px ;">
            <el-table ref="multipleTable" border :data="tableData" tooltip-effect="dark" style="width: 100%">

              <el-table-column prop="id" label="订单编号" width="420">
              </el-table-column>
              <el-table-column prop="userId" label="用户id" width="220">
              </el-table-column>
              <el-table-column prop="createTime" label="创建时间" width="220">
              </el-table-column>
              <el-table-column label="订单状态" width="120">
                <template slot-scope="scope">
                  <div v-if="scope.row.status === 1" style="color:rgb(127, 255, 187);">交易完成</div>
                  <div v-else-if="scope.row.status === 0" style="color:rgb(127, 157, 255);">待发货</div>
                  <div v-else-if="scope.row.status === 2" style="color:rgb(127, 157, 255);">订单已删除</div>
                  <div v-else style="color:rgb(255, 47, 36);">申请退款</div>

                </template>
              </el-table-column>
              <el-table-column label="权限管理" width="120">
                <span class="handle" @click="editEmp()">编辑</span>

              </el-table-column>
              <el-table-column label="操作" width="120">
                <span class="handle" style="color: #da2020;" @click="delEmp()">删除</span>
              </el-table-column>
            </el-table>
            <el-pagination style="margin-top: 20px;" :page-size="100" layout="total, prev, pager, next" :total="1000">
            </el-pagination>
          </div>
        </div>
    </div>


      
  </div>
</template>

<script>
export default {
  data(){
    return{
      addOrder:false,
      tableData:[
        { id: '12492139181', userId: '7283141', createTime: '2023/4/16', status: 0 },
        { id: '12492139181', userId: '7283141', createTime: '2023/4/16', status: 1 },
        { id: '12492139181', userId: '7283141', createTime: '2023/4/16', status: 0 },
        { id: '12492139181', userId: '7283141', createTime: '2023/4/16', status: 1 },
        { id: '12492139181', userId: '7283141', createTime: '2023/4/16', status: 0 },
        { id: '12492139181', userId: '7283141', createTime: '2023/4/16', status: 0 },

      ]

    }
  }
}
</script>

<style scoped>
.title {
    font-size: larger;
    margin: 10px 10px 30px 0;
    /* font-family: Microsoft YaHei; */
}
.handle {
    margin: 0 10px;
    color: #409EFF;
    /* 鼠标移上去有手形 */
    cursor: pointer
}
</style>